package top.songxs.gmall.feign.product;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import top.songxs.gmall.common.result.Result;
import top.songxs.gmall.feign.product.fallback.CategoryFeignFallBack;
import top.songxs.gmall.product.view.CategoryView;
import top.songxs.gmall.product.vo.CategoryVo;

import java.util.List;

@FeignClient(value = "service-product",fallback = CategoryFeignFallBack.class)
public interface CategoryFeignClient {

    @GetMapping(value = "/api/inner/product/categorys/tree")
    public abstract Result<List<CategoryVo>> findAllCategoryTree() ;

    @GetMapping("/api/inner/product/category3List/{skuId}")
    public Result<CategoryView> findAllCategory(@PathVariable("skuId") Long skuId) ;

}